package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchWaterQualityAnalysisMapper;
import com.ruoyi.system.domain.DispatchWaterQualityAnalysis;
import com.ruoyi.system.service.IDispatchWaterQualityAnalysisService;

/**
 * 水质分析报Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchWaterQualityAnalysisServiceImpl implements IDispatchWaterQualityAnalysisService 
{
    @Autowired
    private DispatchWaterQualityAnalysisMapper dispatchWaterQualityAnalysisMapper;

    /**
     * 查询水质分析报
     * 
     * @param waterQualityAnalysisId 水质分析报主键
     * @return 水质分析报
     */
    @Override
    public DispatchWaterQualityAnalysis selectDispatchWaterQualityAnalysisByWaterQualityAnalysisId(Long waterQualityAnalysisId)
    {
        return dispatchWaterQualityAnalysisMapper.selectDispatchWaterQualityAnalysisByWaterQualityAnalysisId(waterQualityAnalysisId);
    }

    /**
     * 查询水质分析报列表
     * 
     * @param dispatchWaterQualityAnalysis 水质分析报
     * @return 水质分析报
     */
    @Override
    public List<DispatchWaterQualityAnalysis> selectDispatchWaterQualityAnalysisList(DispatchWaterQualityAnalysis dispatchWaterQualityAnalysis)
    {
        return dispatchWaterQualityAnalysisMapper.selectDispatchWaterQualityAnalysisList(dispatchWaterQualityAnalysis);
    }

    /**
     * 新增水质分析报
     * 
     * @param dispatchWaterQualityAnalysis 水质分析报
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchWaterQualityAnalysis(DispatchWaterQualityAnalysis dispatchWaterQualityAnalysis)
    {
        return dispatchWaterQualityAnalysisMapper.insertDispatchWaterQualityAnalysis(dispatchWaterQualityAnalysis);
    }

    /**
     * 修改水质分析报
     * 
     * @param dispatchWaterQualityAnalysis 水质分析报
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchWaterQualityAnalysis(DispatchWaterQualityAnalysis dispatchWaterQualityAnalysis)
    {
        return dispatchWaterQualityAnalysisMapper.updateDispatchWaterQualityAnalysis(dispatchWaterQualityAnalysis);
    }

    /**
     * 批量删除水质分析报
     * 
     * @param waterQualityAnalysisIds 需要删除的水质分析报主键
     * @return 结果
     */
    @Override
    public int deleteDispatchWaterQualityAnalysisByWaterQualityAnalysisIds(Long[] waterQualityAnalysisIds)
    {
        return dispatchWaterQualityAnalysisMapper.deleteDispatchWaterQualityAnalysisByWaterQualityAnalysisIds(waterQualityAnalysisIds);
    }

    /**
     * 删除水质分析报信息
     * 
     * @param waterQualityAnalysisId 水质分析报主键
     * @return 结果
     */
    @Override
    public int deleteDispatchWaterQualityAnalysisByWaterQualityAnalysisId(Long waterQualityAnalysisId)
    {
        return dispatchWaterQualityAnalysisMapper.deleteDispatchWaterQualityAnalysisByWaterQualityAnalysisId(waterQualityAnalysisId);
    }
}
